/**
 * 
 */
package com.dzienniczekwedkarza.activities;

import android.os.Bundle;
import android.support.v4.app.FragmentTabHost;

import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.dzienniczekwedkarza.R;
import com.dzienniczekwedkarza.fragments.ChangesFragment;
import com.dzienniczekwedkarza.fragments.ContactFragment;
import com.dzienniczekwedkarza.fragments.InformationsFragment;


/**
 * @author Rafał Wysogląd
 *
 */
public class AboutTheApplicationActivity extends SherlockFragmentActivity  {
	
	
	/**
	 * This demonstrates how you can implement switching between the tabs of a
	 * TabHost through fragments, using FragmentTabHost.
	 */
	
	 //Declare Variables  
	 private FragmentTabHost mTabHost;
	 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
	        super.onCreate(savedInstanceState);

	        // Set the view from activity_the_application.xml
	        setContentView(R.layout.activity_the_application);
	        setTitle("      O aplikacji");
	        
	        // Locate android.R.id.tabhost in activity_the_application.xml
	        mTabHost = (FragmentTabHost) findViewById(android.R.id.tabhost);
	        
	        // Create the tabs in activity_the_application.xml
	        mTabHost.setup(this, getSupportFragmentManager(), R.id.realtabcontent);

           //Do wstawienia własne klasy dla każdego addTab, do podmiany, tam gdzie czerwone linie są.
	       //http://stackoverflow.com/questions/8867134/android-sdk-fragment-support
	        
	       // Create Tab1(Informacje), Tab2(Zmiany), Tab3 (Polecane) , Tab4 (Kontakt) 
	        mTabHost.addTab(mTabHost.newTabSpec("Informations").setIndicator("Informacje"), InformationsFragment.class, null);
	        mTabHost.addTab(mTabHost.newTabSpec("Changes").setIndicator("Zmiany"), ChangesFragment.class, null);
	       //mTabHost.addTab(mTabHost.newTabSpec("Featured").setIndicator("Polecane"), FeaturedFragment.class, null);
	        mTabHost.addTab(mTabHost.newTabSpec("Contact").setIndicator("Kontakt"), ContactFragment.class, null);
	    }

	
	
	

}
